

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>federatedml.evaluation package &mdash; FATE 1.0 documentation</title>
  

  
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> FATE
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <!-- Local TOC -->
              <div class="local-toc"><ul>
<li><a class="reference internal" href="#">federatedml.evaluation package</a><ul>
<li><a class="reference internal" href="#subpackages">Subpackages</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-federatedml.evaluation.evaluation">federatedml.evaluation.evaluation module</a></li>
<li><a class="reference internal" href="#module-federatedml.evaluation">Module contents</a></li>
</ul>
</li>
</ul>
</div>
            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">FATE</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>federatedml.evaluation package</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/federatedml.evaluation.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="federatedml-evaluation-package">
<h1>federatedml.evaluation package<a class="headerlink" href="#federatedml-evaluation-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="federatedml.evaluation.test.html">federatedml.evaluation.test package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="federatedml.evaluation.test.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.evaluation.test.html#module-federatedml.evaluation.test.evaluation_run_test">federatedml.evaluation.test.evaluation_run_test module</a></li>
<li class="toctree-l2"><a class="reference internal" href="federatedml.evaluation.test.html#module-federatedml.evaluation.test">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-federatedml.evaluation.evaluation">
<span id="federatedml-evaluation-evaluation-module"></span><h2>federatedml.evaluation.evaluation module<a class="headerlink" href="#module-federatedml.evaluation.evaluation" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.evaluation.evaluation.BiClassAccuracy">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.evaluation.</code><code class="descname">BiClassAccuracy</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#BiClassAccuracy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.BiClassAccuracy" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Compute binary classification accuracy</p>
<dl class="method">
<dt id="federatedml.evaluation.evaluation.BiClassAccuracy.compute">
<code class="descname">compute</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds</em>, <em>normalize=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#BiClassAccuracy.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.BiClassAccuracy.compute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.evaluation.evaluation.BiClassPrecision">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.evaluation.</code><code class="descname">BiClassPrecision</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#BiClassPrecision"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.BiClassPrecision" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Compute binary classification precision</p>
<dl class="method">
<dt id="federatedml.evaluation.evaluation.BiClassPrecision.compute">
<code class="descname">compute</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#BiClassPrecision.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.BiClassPrecision.compute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.evaluation.evaluation.BiClassRecall">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.evaluation.</code><code class="descname">BiClassRecall</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#BiClassRecall"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.BiClassRecall" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Compute binary classification recall</p>
<dl class="method">
<dt id="federatedml.evaluation.evaluation.BiClassRecall.compute">
<code class="descname">compute</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#BiClassRecall.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.BiClassRecall.compute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.evaluation.evaluation.Evaluation">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.evaluation.</code><code class="descname">Evaluation</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="federatedml.html#federatedml.model_base.ModelBase" title="federatedml.model_base.ModelBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.model_base.ModelBase</span></code></a></p>
<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.accuracy">
<code class="descname">accuracy</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em>, <em>normalize=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.accuracy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.accuracy" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the accuracy
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,
:param normalize:
:type normalize: bool. If true, return the fraction of correctly classified samples, else returns the number of correctly classified samples</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the key is threshold and the value is the accuracy of this threshold.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.auc">
<code class="descname">auc</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.auc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.auc" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute AUC for binary classification.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>labels</strong> (<em>value list. The labels of data set.</em>) – </li>
<li><strong>pred_scores</strong> (<em>value list. The predict results of model. It should be corresponding to labels each data.</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The AUC</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">float</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.explained_variance">
<code class="descname">explained_variance</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.explained_variance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.explained_variance" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute explain variance
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The explain variance</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.fit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.gain">
<code class="descname">gain</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.gain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.gain" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute gain of binary classification.
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The gain</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.ks">
<code class="descname">ks</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.ks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.ks" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute Kolmogorov-Smirnov
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
<li><strong>max_ks_interval</strong> (<em>float max value of each tpr - fpt</em>)</li>
<li><em>fpr</em></li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.lift">
<code class="descname">lift</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.lift"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.lift" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute lift of binary classification.
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The lift</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.mean_absolute_error">
<code class="descname">mean_absolute_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.mean_absolute_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.mean_absolute_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute mean absolute error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A non-negative floating point.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.mean_squared_error">
<code class="descname">mean_squared_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.mean_squared_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.mean_squared_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute mean square error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A non-negative floating point value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.mean_squared_log_error">
<code class="descname">mean_squared_log_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.mean_squared_log_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.mean_squared_log_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute mean squared logarithmic error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A non-negative floating point value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.median_absolute_error">
<code class="descname">median_absolute_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.median_absolute_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.median_absolute_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute median absolute error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A positive floating point value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.precision">
<code class="descname">precision</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em>, <em>result_filter=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.precision"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.precision" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the precision
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,
:param result_filter:
:type result_filter: value list. If result_filter is not None, it will filter the label results not in result_filter.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The key is threshold and the value is another dic, which key is label in parameter labels, and value is the label’s precision.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.r2_score">
<code class="descname">r2_score</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.r2_score"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.r2_score" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute R^2 (coefficient of determination) score
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The R^2 score</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.recall">
<code class="descname">recall</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.recall"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.recall" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the recall
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,
:param result_filter:
:type result_filter: value list. If result_filter is not None, it will filter the label results not in result_filter.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The key is threshold and the value is another dic, which key is label in parameter labels, and value is the label’s recall.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.roc">
<code class="descname">roc</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.roc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.roc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.root_mean_squared_error">
<code class="descname">root_mean_squared_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.root_mean_squared_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.root_mean_squared_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the root of mean square error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A positive floating point value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.evaluation.Evaluation.save_data">
<code class="descname">save_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.save_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Evaluation.save_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.evaluation.evaluation.Gain">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.evaluation.</code><code class="descname">Gain</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Gain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Gain" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Compute Gain</p>
<dl class="method">
<dt id="federatedml.evaluation.evaluation.Gain.compute">
<code class="descname">compute</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Gain.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Gain.compute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.evaluation.evaluation.Lift">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.evaluation.</code><code class="descname">Lift</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Lift"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Lift" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Compute lift</p>
<dl class="method">
<dt id="federatedml.evaluation.evaluation.Lift.compute">
<code class="descname">compute</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Lift.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.Lift.compute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.evaluation.evaluation.MultiClassAccuracy">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.evaluation.</code><code class="descname">MultiClassAccuracy</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#MultiClassAccuracy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.MultiClassAccuracy" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Compute multi-classification accuracy</p>
<dl class="method">
<dt id="federatedml.evaluation.evaluation.MultiClassAccuracy.compute">
<code class="descname">compute</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>normalize=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#MultiClassAccuracy.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.MultiClassAccuracy.compute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.evaluation.evaluation.MultiClassPrecision">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.evaluation.</code><code class="descname">MultiClassPrecision</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#MultiClassPrecision"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.MultiClassPrecision" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Compute multi-classification precision</p>
<dl class="method">
<dt id="federatedml.evaluation.evaluation.MultiClassPrecision.compute">
<code class="descname">compute</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#MultiClassPrecision.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.MultiClassPrecision.compute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="federatedml.evaluation.evaluation.MultiClassRecall">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.evaluation.</code><code class="descname">MultiClassRecall</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#MultiClassRecall"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.MultiClassRecall" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Compute multi-classification recall</p>
<dl class="method">
<dt id="federatedml.evaluation.evaluation.MultiClassRecall.compute">
<code class="descname">compute</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#MultiClassRecall.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.evaluation.MultiClassRecall.compute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-federatedml.evaluation">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-federatedml.evaluation" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="federatedml.evaluation.Evaluation">
<em class="property">class </em><code class="descclassname">federatedml.evaluation.</code><code class="descname">Evaluation</code><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="federatedml.html#federatedml.model_base.ModelBase" title="federatedml.model_base.ModelBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">federatedml.model_base.ModelBase</span></code></a></p>
<dl class="method">
<dt id="federatedml.evaluation.Evaluation.accuracy">
<code class="descname">accuracy</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em>, <em>normalize=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.accuracy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.accuracy" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the accuracy
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,
:param normalize:
:type normalize: bool. If true, return the fraction of correctly classified samples, else returns the number of correctly classified samples</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the key is threshold and the value is the accuracy of this threshold.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.auc">
<code class="descname">auc</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.auc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.auc" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute AUC for binary classification.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>labels</strong> (<em>value list. The labels of data set.</em>) – </li>
<li><strong>pred_scores</strong> (<em>value list. The predict results of model. It should be corresponding to labels each data.</em>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The AUC</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">float</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.explained_variance">
<code class="descname">explained_variance</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.explained_variance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.explained_variance" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute explain variance
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The explain variance</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.fit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.fit" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.gain">
<code class="descname">gain</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.gain"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.gain" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute gain of binary classification.
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The gain</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.ks">
<code class="descname">ks</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.ks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.ks" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute Kolmogorov-Smirnov
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><ul class="simple">
<li><strong>max_ks_interval</strong> (<em>float max value of each tpr - fpt</em>)</li>
<li><em>fpr</em></li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.lift">
<code class="descname">lift</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.lift"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.lift" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute lift of binary classification.
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The lift</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.mean_absolute_error">
<code class="descname">mean_absolute_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.mean_absolute_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.mean_absolute_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute mean absolute error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A non-negative floating point.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.mean_squared_error">
<code class="descname">mean_squared_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.mean_squared_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.mean_squared_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute mean square error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A non-negative floating point value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.mean_squared_log_error">
<code class="descname">mean_squared_log_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.mean_squared_log_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.mean_squared_log_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute mean squared logarithmic error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A non-negative floating point value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.median_absolute_error">
<code class="descname">median_absolute_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.median_absolute_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.median_absolute_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute median absolute error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A positive floating point value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.precision">
<code class="descname">precision</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em>, <em>result_filter=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.precision"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.precision" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the precision
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,
:param result_filter:
:type result_filter: value list. If result_filter is not None, it will filter the label results not in result_filter.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The key is threshold and the value is another dic, which key is label in parameter labels, and value is the label’s precision.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.r2_score">
<code class="descname">r2_score</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.r2_score"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.r2_score" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute R^2 (coefficient of determination) score
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The R^2 score</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.recall">
<code class="descname">recall</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em>, <em>thresholds=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.recall"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.recall" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the recall
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
:param thresholds: if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
:type thresholds: value list. This parameter effective only for ‘binary’. The predict scores will be 1 if it larger than thresholds, if not,
:param result_filter:
:type result_filter: value list. If result_filter is not None, it will filter the label results not in result_filter.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The key is threshold and the value is another dic, which key is label in parameter labels, and value is the label’s recall.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.roc">
<code class="descname">roc</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.roc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.roc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.root_mean_squared_error">
<code class="descname">root_mean_squared_error</code><span class="sig-paren">(</span><em>labels</em>, <em>pred_scores</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.root_mean_squared_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.root_mean_squared_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the root of mean square error
:param labels:
:type labels: value list. The labels of data set.
:param pred_scores:
:type pred_scores: value list. The predict results of model. It should be corresponding to labels each data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A positive floating point value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="federatedml.evaluation.Evaluation.save_data">
<code class="descname">save_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/federatedml/evaluation/evaluation.html#Evaluation.save_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#federatedml.evaluation.Evaluation.save_data" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
</div>


           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2019, FATE_TEAM

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>